#Copyright (c) Facebook, Inc. and its affiliates.
#This source code is licensed under the MIT license found in the
#LICENSE file in the root directory of this source tree.

cmake_minimum_required(VERSION 3.4.1)
project(native-imagetranscoder)
add_definitions(-DOPENHARMONY)
set(TOP_DIR ${CMAKE_CURRENT_LIST_DIR}/../)
add_subdirectory(${TOP_DIR}../../../../nativedeps/merge/libjpeg-turbo-1.5.3 libjpeg-turbo-1.5.3.out)
add_library( # Sets the name of the library.
             native-imagetranscoder

             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
             	decoded_image.cpp
             	exceptions_handler.cpp
             	init.cpp
             	jpeg/jpeg_codec.cpp
             	jpeg/jpeg_error_handler.cpp
             	jpeg/jpeg_memory_io.cpp
             	jpeg/jpeg_stream_wrappers.cpp
             	transformations.cpp
             	JpegTranscoder.cpp)

target_link_libraries(${PROJECT_NAME} PRIVATE hilog_ndk.z)
target_link_libraries(${PROJECT_NAME} PRIVATE fb_jpegturbo)

target_include_directories(${PROJECT_NAME} PRIVATE ${TOP_DIR}../../../../nativedeps/merge/libjpeg-turbo-1.5.3)